<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script src="/static/plugins/mCustomScrollbar/jquery.mCustomScrollbar.concat.min.js"
        type="text/javascript"></script>
<script src="/static/plugins/mCustomScrollbar/jquery.mCustomScrollbar.js"
        type="text/javascript"></script>
<link href="/static/plugins/mCustomScrollbar/jquery.mCustomScrollbar.min.css"
      rel="stylesheet">

<style type="text/css">
	.exit:hover { color:#ed5565; }
	.rigthTop{
	    top: 58px;
	    position: fixed;
	    margin-left: 240px;
	    height: 44px;
	    width: 100%;
    	background-color: white;
    	padding-top: 11px;
	    display: block;
	    z-index: 999;
	}
	.rightTopA{
		font-size: 16px;
    	color: black;
    	font-weight: bolder;
    	cursor: default !important;
    	
	}
	.rightTopI{
		font-size: 21px;
    	margin-right: 10px;
    	width: 16px;
    	text-align: center;
    	margin-left: 48px;
    	
	}
	.rightTopA:hover{color: black;}
	
	.right{
		*+margin-left:0;
	}
</style>
<div class="top">
    <div class="icon">
        <a onclick="myIndex()" class="icon-title" >
        互联网+管理
        </a>
    </div>
    <div class="top_left">
        <h5>
            <div id="time"></div>
            <span id="selfname">${selfname}</span>
        </h5>
        <div class="top_left_right">
            <c:if test="${sessionScope.user.rLevel != 4}">
	            <a class="exit" onclick="changePassword();">${communityName}</a>
            </c:if>
            <a class="exit" onclick="logout();">退出</a>
        </div>
    </div>
</div>

<div class="left" id="menus" style="color:#fff;">
    <jsp:include page="menu.jsp"></jsp:include>
</div>
<div class="rigthTop" id="rigthTop">
    <a class="resource_oper default" onclick="back()" style="float:right;font-size: 14px;margin-right: 22%;"><i class="glyphicon glyphicon-circle-arrow-left" style="margin-right: 4px;font-size: 14px;"></i>后退</a>
    <a class="resource_oper default" onclick="myIndex()" style="float:right;font-size: 14px;margin-right: 1%;"><i class="glyphicon glyphicon-th-large" style="margin-right: 4px;font-size: 14px;"></i>主页</a>
    <i class="fa fa-home rightTopI"></i><a class="rightTopA" id="rightTopMsg">管理后台</a>
</div>

<script type="text/javascript">

	var url = "<%=request.getContextPath()%>";
    function logout() {
        window.location.href = url + "/logout";
    }
    function changePassword() {
    	window.location.href = "${pageContext.request.contextPath}/admin/sysopt_changePassword.action";
    }
    function editPsw() {

    }

    function userhelp() {

    }
    function go2data() {
        window.parent.mainFrame.modalDialogAlert("正在建设中......");
    }

    function myIndex()  
    {  
    	window.location.href ="${pageContext.request.contextPath}/admin/index.action";
    } 

    function back()  
    {  
    	history.go(-1); //后退1页  
    } 
    function t() {
        var time = document.getElementById("time");
        var d = new Date();
        var year = d.getFullYear();// 获取4位的年份
        var day = d.getDate();
        var month = d.getMonth();// 从0-11
        var week = d.getDay();// 从0-7
        /*  var hours = d.getHours();
         if(hours < 10){
         hours="0"+hours;
         }
         var minutes = d.getMinutes();
         if(minutes < 10){
         minutes = "0"+minutes;
         }
         var seconds = d.getSeconds();
         if(seconds < 10){
         seconds = "0" + seconds;
         }*/
        switch (parseInt(week)) {// 零代表礼拜天
            case 0:
                week = "星期日";
                break;// break省略后，代码会一直向下执行。直到结束或遇到break。
            case 1:
                week = "星期一";
                break;
            case 2:
                week = "星期二";
                break;
            case 3:
                week = "星期三";
                break;
            case 4:
                week = "星期四";
                break;
            case 5:
                week = "星期五";
                break;
            case 6:
                week = "星期六";
                break;
        }
        time.innerHTML = year + "年" + (month + 1) + "月" + day + "日 " + week;
        /*"+ hours + ":" + minutes + ":" + seconds;*/
    }
    t();
    /*var intervalId;// 全局变量，存储setInterval函数返回的ID值
     onload = function () {// 在窗体加载完成后绑定控件的事件。
     setInterval(t, 1000);// 1秒钟执行一次t方法。
     };*/
</script>
</script>